<table cellpadding="0" cellspacing="2" width="100%">
	<tr style="vertical-align: top; padding-top: 2px;">
		<td style="vertical-align: top; padding-top: 2px;" width="35%">
		<!-- 表名列表 -->
	<p-table [value]="tableList">
	<ng-template pTemplate="caption"> {{ "txt.dataIETables" | i18n }} </ng-template>
		<ng-template pTemplate="header">
			<tr>
				<th style="width: 73px;">{{ "txt.TabGroupName" | i18n}}</th>
				<th style="overflow:hidden; text-overflow:ellipsis; width: 220px">{{ "txt.TableName" | i18n}}</th>
				<th style="width: 350px">{{ "txt.Description" | i18n}}</th>
			</tr>
		</ng-template>
		<ng-template pTemplate="body" pTemplate="body" let-tbl>
			<tr (click)="onSelectTable(tbl)" [class.selected]="tbl.isSelected">
				<td style="width: 70px">{{tbl.groupName}}</td>
				<td style="overflow:hidden; text-overflow:ellipsis; width: 220px" title="{{tbl.code}}">{{tbl.code}}</td>
				<td style="width: 350px">{{tbl.name}}</td>
			</tr>
		</ng-template>
	</p-table>
		</td><td style="padding-left: 8px;padding-right: 8px;">
		<div *ngIf="dataExport">
			<div class="legend_title">{{ "txt.dataExportCustomize" | i18n}}</div>
			<div style="padding: 10px 0">
				<label style="padding-right: 10px;font-size:16px;">{{ "txt.DataFilter" | i18n}}:</label><input pInputText type="text" [(ngModel)]="dataExport.filter" placeholder="{{'txt.example' | i18n: ['DATA_DATE=\'20161231\' and ...']}}" style="width: 300px;"/>
				<p-button [disabled]="(!selectedTemplate && dataExport && dataExport.useTemplate)" (click)="exportData()" label="{{'txt.ExportData' | i18n}}"></p-button>
			</div>
			<!-- <@sec.authorize url='/iisp-data-ie/templates.htm.GET'>  模板管理员才能选择是否导出到模板 -->
			<div style="width:100%;height:40px;">
				<div style="width:70%;display: inline-block;font-size:16px; padding-bottom:10px;">
					<label style="padding-right: 0px;font-size:16px;">{{ "txt.ExportToTemplate" | i18n}}?</label>
					<p-radioButton name="exportMode" value="true" [(ngModel)]="dataExport.useTemplate"></p-radioButton>{{ "txt.Yes" | i18n}}
					<p-radioButton name="exportMode" value="false" [(ngModel)]="dataExport.useTemplate"></p-radioButton>{{ "txt.No" | i18n}}
				</div>
				<div style="display: inline-block;font-size:16px;">
					<a href="${request.contextPath}/iisp-data-ie/templates.htm" style="font-size:16px;">去维护模板</a>
				</div>
			</div>
			<!-- </@sec.authorize> -->
			<div style="font-size:16px;"><label style="padding-right:0;font-size:16px;" >{{ "txt.ExportIncDataOnly" | i18n}}?</label>
				<span class="k-icon k-i-warning" style="color: #f1be3e;" title="<@sp.message code='increase.only.mode.warn'/>"></span>
					<p-radioButton name="isExportIncOnly" value="true" [(ngModel)]="dataExport.isExportIncOnly"></p-radioButton>{{ "txt.Yes" | i18n}}
					<p-radioButton name="isExportIncOnly" value="false" [(ngModel)]="dataExport.isExportIncOnly"></p-radioButton>{{ "txt.No" | i18n}}
			</div>
		</div>
		<div *ngIf="dataExport && dataExport.useTemplate && tableTemplates">
			<p-table [value]="tableTemplates">
				<ng-template pTemplate="caption"> {{ "txt.templatesOfTable" | i18n : [selectedTable.name]}} </ng-template>
				<ng-template pTemplate="header">
					<tr>
						<th>{{ "txt.Description" | i18n}}</th>
						<th>{{ "txt.Uploader" | i18n}}</th>
						<th>{{ "txt.UploadTime" | i18n}}</th>
					</tr>
				</ng-template>
				<ng-template pTemplate="body" pTemplate="body" let-tmpl>
					<tr>
						<td>{{tmpl.dscName}}</td>
						<td>{{tmpl.createUser}}</td>
						<td>{{tmpl.createTime.getFullYear()}}-{{tmpl.createTime.getMonth()+1}}-{{tmpl.createTime.getDate()}} {{tmpl.createTime.getHours()}}:{{tmpl.createTime.getMinutes()<10?'0'+tmpl.createTime.getMinutes():tmpl.createTime.getMinutes()}}</td>
					</tr>
				</ng-template>
			</p-table>
		</div>
		<!-- <@sec.authorize url='/iisp-data-ie/templates.htm.GET'>  模板管理员才能无模板导出  -->
		<div *ngIf="dataExport && !dataExport.useTemplate">
			<p-table [value]="dataExport.columns">
				<ng-template pTemplate="caption"> {{ "txt.SelectColumns" | i18n}} </ng-template>
				<ng-template pTemplate="header">
					<tr>
						<th>{{ "txt.ColName" | i18n}}</th>
						<th>{{ "txt.ColDesc" | i18n}}</th>
						<th>{{ "txt.IsExport" | i18n}}?</th>
					</tr>
				</ng-template>
				<ng-template pTemplate="body" pTemplate="body" let-tcol>
					<tr>
						<td>{{tcol.name}}</td>
						<td>{{tcol.desc}}</td>
						<td [ngSwitch]="tcol.isRequired">
							<input *ngSwitchCase="true" type="checkbox" disabled="1" checked="1" />
							<input *ngSwitchDefault type="checkbox" [(ngModel)]="tcol.isExport" />
						</td>
					</tr>
				</ng-template>
			</p-table>
		</div>
		<!-- </@sec.authorize> -->
		</td>
	</tr>
</table>
<i-mbox [isRunning]="isRunning()"></i-mbox>